        <!DOCTYPE html>
        <html>
        <head>
                <meta charset="utf-8">
        <title>ContactFilter class / box2d Library / Dart Documentation</title>
        <link rel="stylesheet" type="text/css"
            href="../styles.css">
        <link href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800" rel="stylesheet" type="text/css">
        <link rel="shortcut icon" href="../favicon.ico">
        
        </head>
        <body data-library="box2d" data-type="ContactFilter">
        <div class="page">
        <div class="header">
          <a href="../index.html"><div class="logo"></div></a>
          <a href="../index.html">Dart Documentation</a>
         &rsaquo; <a href="../box2d.html">box2d</a> &rsaquo; <a href="../box2d/ContactFilter.html">ContactFilter</a>        <div id="search-box">
          <input type="search" name="q" id="q" autocomplete="off"
              class="search-input" placeholder="Search API">
        </div>
        
      </div>
      <div class="drop-down" id="drop-down"></div>
      
        <div class="nav">
        
</div>
<div class="content">
        <h2><strong>ContactFilter</strong>
          class
        </h2>
        
<button id="show-inherited" class="show-inherited">Hide inherited</button>
<div class="doc">
<pre class="source">
class ContactFilter {
 ContactFilter();

 /**
  * Return true if contact calculations should be performed between these two
  * shapes.
  */
 bool shouldCollide(Fixture fixtureA, Fixture fixtureB) {
   final Filter filterA = fixtureA.filter;
   final Filter filterB = fixtureB.filter;

   if (filterA.groupIndex != 0 &amp;&amp; filterA.groupIndex == filterB.groupIndex)
     return filterA.groupIndex &gt; 0;

   return (filterA.maskBits &amp; filterB.categoryBits) != 0 &amp;&amp;
          (filterA.categoryBits &amp; filterB.maskBits) != 0;
 }
}
</pre>
</div>
<div>
<h3>Constructors</h3>
<div class="method"><h4 id="ContactFilter">
<button class="show-code">Code</button>
new <strong>ContactFilter</strong>() <a class="anchor-link" href="#ContactFilter"
              title="Permalink to ContactFilter.ContactFilter">#</a></h4>
<div class="doc">
<pre class="source">
ContactFilter();
</pre>
</div>
</div>
</div>
<div>
<h3>Methods</h3>
<div class="method"><h4 id="shouldCollide">
<button class="show-code">Code</button>
bool <strong>shouldCollide</strong>(<a href="../box2d/Fixture.html">Fixture</a> fixtureA, <a href="../box2d/Fixture.html">Fixture</a> fixtureB) <a class="anchor-link" href="#shouldCollide"
              title="Permalink to ContactFilter.shouldCollide">#</a></h4>
<div class="doc">
<p>Return true if contact calculations should be performed between these two
shapes.</p>
<pre class="source">
bool shouldCollide(Fixture fixtureA, Fixture fixtureB) {
 final Filter filterA = fixtureA.filter;
 final Filter filterB = fixtureB.filter;

 if (filterA.groupIndex != 0 &amp;&amp; filterA.groupIndex == filterB.groupIndex)
   return filterA.groupIndex &gt; 0;

 return (filterA.maskBits &amp; filterB.categoryBits) != 0 &amp;&amp;
        (filterA.categoryBits &amp; filterB.maskBits) != 0;
}
</pre>
</div>
</div>
</div>
        </div>
        <div class="clear"></div>
        </div>
        <div class="footer">
          
        </div>
        <script async src="../client-live-nav.js"></script>
        </body></html>
        
